//
//  HHFaceMessageCellData.m
//  HHChatKit
//
//  Created by Henry on 2021/6/3.
//

#import "HHFaceMessageCellData.h"

@implementation HHFaceMessageCellData

+ (NSString *)reuseIdentifier {
    return @"HHFaceMessageCell";
}

- (CGSize)contentSize {
    return CGSizeMake(80, 80);
    
    CGFloat heightMax = MIN([UIScreen mainScreen].bounds.size.width, [UIScreen mainScreen].bounds.size.height) * 0.25;

    UIImage *image = [UIImage imageWithContentsOfFile:self.path];
    CGFloat imageHeight = image.size.height;
    CGFloat imageWidth = image.size.width;
    if (imageHeight > heightMax) {
       imageHeight = heightMax;
       imageWidth = image.size.width / image.size.height * imageHeight;
    }
    if (imageWidth > heightMax) {
       imageWidth = heightMax;
       imageHeight = image.size.height / image.size.width * imageWidth;
    }
    return CGSizeMake(imageWidth, imageHeight);
}

@end
